package com.ruoyi.dataserver.point.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum PointFieldEnum {
    BSM("BSM","BSM","标识码"),
    DM("DM","DM","代码"),
    WTDH("WTDH","WTDH","物探点号"),
    TSDH("TSDH","TSDH","图上点号"),
    XZB("XZB","XZB","X坐标"),
    YZB("YZB","YZB","Y坐标"),
    DMGC("DMGC","DMGC","地面高程"),
    US_ID("US_ID","US_ID","US_ID"),
    ;



    private String code;
    private String fieldName;
    private String description;

    public static PointFieldEnum getPointFieldEnumWithCode(String code){
        if (code == null || code.isEmpty()){
            return null;
        }
        for (PointFieldEnum pointFieldEnum : PointFieldEnum.values()) {
            if (code.equals(pointFieldEnum.getCode())){
                return  pointFieldEnum;
            }
        }
        return null;
    }
}
